﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel.Composition;
using System.Diagnostics;

namespace AzureToolkit.Domain
{
    [Export]
    [PartCreationPolicy(CreationPolicy.NonShared)]
    public class Command2 : IBatchCommand<Command2Message>
    {

        List<string> messageTextList = new List<string>();

        public void PreRun()
        {
            messageTextList.Add("Start");
        }

        public void Run(Command2Message message)
        {
            messageTextList.Add(message.Text);
        }

        public void PostRun()
        {
            foreach (var m in messageTextList)
            {
                Trace.WriteLine(m);
            }
        }
    }
}
